﻿using ECG.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ECG.DAL
{
    public partial class ProductCategoryMapLinkDb
    {
        public static List<ProductCategoryMapLinkDto> ShowBYCate(string category)
        {
            var dao = SharedSqlDao;
            var command = dao.GetDbSprocCommand("WSPX_Admin_ProductCategoryMapLink_SelectByCateId");
            try
            {
                command.Parameters.Add(dao.CreateParameter("@CategoryId", category));
                var result = dao.GetDTOList<ProductCategoryMapLinkDto>(ref command);
                return result;
            }
            finally
            {
                command.Connection.Close();
            }
        }

    }
}
